package com.jspx.boot.sign;

public class SexType {

    static public final int man = 1;
    static public final int woman = 0;

    static public final int unknown = -1;

    public static String getSexZh(int sex)
    {
        if (man==sex) return "男";
        if (woman==sex||2==sex) return "女";
        return "未知";
    }

    public static int getSex(String sex)
    {
        if ("1".equalsIgnoreCase(sex)||"男".equalsIgnoreCase(sex)||"husband".equalsIgnoreCase(sex)||"man".equalsIgnoreCase(sex)||sex.equalsIgnoreCase("mankind")) return man;
        if ("0".equalsIgnoreCase(sex)||"女".equalsIgnoreCase(sex)||"femininity".equalsIgnoreCase(sex) ||"woman".equalsIgnoreCase(sex)) return woman;
        return unknown;
    }
}
